<form nz-form [formGroup]="addEditForm">
  <nz-form-item>
    <nz-form-label nzFor="taskName" nzRequired [nzSm]="4" [nzXs]="24">任务名称</nz-form-label>
    <nz-form-control [nzErrorTip]="combineTpl" [nzSm]="18" [nzXs]="24">
      <input id="taskName" formControlName="taskName" nz-input placeholder="任务名称" />
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label nzFor="taskDesc" [nzSm]="4" [nzXs]="24">任务描述</nz-form-label>
    <nz-form-control [nzErrorTip]="combineTpl" [nzSm]="18" [nzXs]="24">
      <textarea id="taskDesc" formControlName="taskDesc" maxlength="255" nz-input placeholder="任务描述" rows="4"></textarea>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label nzFor="userName" nzRequired [nzSm]="4" [nzXs]="24">执行人</nz-form-label>
    <nz-form-control [nzErrorTip]="combineTpl" [nzSm]="18" [nzXs]="24">
      <nz-form-control [nzErrorTip]="combineTpl" [nzSm]="18" [nzXs]="24">
        <input id="userName" formControlName="userName" nz-input placeholder="执行人" />
      </nz-form-control>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label nzFor="startTime" nzRequired [nzSm]="4" [nzXs]="24">开始时间</nz-form-label>
    <nz-form-control [nzErrorTip]="combineTpl" [nzSm]="18" [nzXs]="24">
      <nz-date-picker formControlName="startTime"></nz-date-picker>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label nzFor="endTime" nzRequired [nzSm]="4" [nzXs]="24">截止时间</nz-form-label>
    <nz-form-control [nzErrorTip]="combineTpl" [nzSm]="18" [nzXs]="24">
      <nz-date-picker formControlName="endTime"></nz-date-picker>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label nzFor="finishRate" nzRequired [nzSm]="4" [nzXs]="24">完成进度</nz-form-label>
    <nz-form-control [nzErrorTip]="combineTpl" [nzSm]="18" [nzXs]="24">
      <nz-slider formControlName="finishRate" [nzTipFormatter]="formatter" [nzTooltipPlacement]="'bottom'"></nz-slider>
    </nz-form-control>
  </nz-form-item>
</form>
<ng-template #combineTpl let-control>
  @if (control.hasError('message')) {
    {{ control.errors.message }}
  }
  @if (control.hasError('required')) {
    必填项
  }
</ng-template>
<ng-template #tagPlaceHolder let-selectedList>以及更多{{ selectedList.length }}人</ng-template>
